﻿using System;
using System.Collections.Generic;
using System.Text;
using WeatherTest.Base;

namespace WeatherTest
{
    public class ForecastDisplay : IObserver, IDisplayElement
    {
        private float _temp, _humidity;

        public void Display()
        {
            //throw new NotImplementedException();
            Console.WriteLine($"天气预报：当前温度为{_temp},湿度为{_humidity}");
        }

        public void Update(float temp, float humidity, float pressure)
        {
            //throw new NotImplementedException();
            _temp = temp;
            _humidity = humidity;
            Display();
        }
    }
}
